#if MSC_VER >=1000
    #pragma execution_character_set("UTF-8")
#endif

#ifndef TSNGSONG_H
#define TSNGSONG_H

#include<QString>
#include<vector>
#include"album.h"
#include"artists.h"
// 歌曲信息
class TSNGSong
{
public:
    TSNGSong();

    static TSNGSong parseFromJSON( QString jsonstr);

    void setId(long id);
    void setName(QString name);
    void setArtists(std::vector<Artists>ar);
    void setAlbum(Album al);
    void setDuration(long duration);
    void setCopyrightId(long cpId);
    void setStatus(int status);
    void setAlias(QString alias);
    void setRtype(int rt);
    void setFtype(int ft);
    void setMvid(long mid);
    void setFee(int fee);
    void setRUrl(QString url);

    long getId()const;
    QString getName()const;
    std::vector<Artists> getArtists();
    Album getAlbum ();
    long getDuration()const;
    long getCopyrightId()const;
    int  getStatus()const;
    QString getAlias()const;
    int getRtype()const;
    int getFtype()const;
    long getMvid()const;
    int getFee()const;
    QString getRUrl()const;

private:
    long id;
    QString name;
    std::vector<Artists>artists;  // 和歌曲相关的艺人信息
    Album album;
    long duration = 0 ; //
    long copyrightId =0;
    int status = 0 ;
    QString alias= "";
    int rtype = 0 ;
    int ftype = 0 ;
    long mvid;
    int fee = 0 ;
    QString rUrl ="";
};

#endif // TSNGSONG_H
